<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMemberInformationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('member_informations', function (Blueprint $table) {
            $table->increments('id');

            $table->integer('member_id')->unique();

            $table->string('company');

            $table->string('legal', 60);
            $table->boolean('legal_gender');
            $table->integer('legal_identity_a')->unsigned();
            $table->integer('legal_identity_b')->unsigned();

            $table->string('region');
            $table->string('address');
            $table->string('contact_person', 60);
            $table->string('contact_phone', 30);
            $table->string('contact_email', 60)->default('');

            $table->integer('business_license')->unsigned();

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('member_informations');
    }
}
